﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ElingOA6_Admin_DSJCJ.BLL
{
    /// <summary>
    /// 人员岗位BLL
    /// </summary>
    public class HREmplPosition
    {
        /// <summary>
        /// 人员岗位DAL
        /// </summary>
        private readonly DAL.HREmplPosition dal = new DAL.HREmplPosition();
        /// <summary>
        /// 构造方法
        /// </summary>
        public HREmplPosition()
        { }
        /// <summary>
        /// 获取人员数据
        /// <creator>zhongyl</creator>
        /// <date>2013-07-12</date>
        /// </summary>
        /// <param name="fDeptNo">部门编号</param>
        /// <param name="fEntityNo">组织机构代码</param>
        /// <returns>人员数据DS</returns>
        public DataSet GetDeptEmplList(string fDeptNo, string fEntityNo)
        {
            return dal.GetDeptEmplList(fDeptNo, fEntityNo);
        }

        /// <summary>
        /// 获取员工岗位信息
        /// <creator>zhongyl</creator>
        /// <date>2013-07-12</date>
        /// </summary>
        /// <param name="emplNo">人员编号</param>
        /// <param name="fEntityNo">组织机构编码</param>
        /// <returns>人员岗位信息DS</returns>
        public DataSet GetEmplPositionInfo(string emplNo, string fEntityNo)
        {
            return dal.GetEmplPositionInfo(emplNo, fEntityNo);
        }

        /// <summary>
        /// 判断部门是否存在人员
        /// <creator>zhongyl</creator>
        /// <date>2013-07-12</date>
        /// </summary>
        /// <param name="deptNo">部门编号</param>
        /// <param name="entityNo">组织机构编号</param>
        /// <returns>是否存在人员</returns>
        public bool ExistsDept(string deptNo, string entityNo)
        {
            return dal.ExistsDept(deptNo, entityNo);
        }
        /// <summary>
        /// 获取主岗位所有人员数据
        /// <creator>wangl</creator>
        /// <date>2013-07-29</date>
        /// </summary>
        /// <param name="entityNo">公司编号</param>
        /// <returns>人员数据DataTable</returns>
        public DataTable GetMainDeptEmplALL(string entityNo)
        {
            return dal.GetMainDeptEmplALL(entityNo).Tables[0];
        }

                /// <summary>
        /// 获取所有人员数据（人员去向不包含虚拟人员）
        /// <creator>zhongyl</creator>
        /// <date>2013-07-29</date>
        /// </summary>
        /// <param name="entityNo">公司编号</param>
        /// <returns>人员数据DataSet</returns>
        public DataTable GetLeaveMainDeptEmplALL(string entityNo)
        {
            return dal.GetLeaveMainDeptEmplALL(entityNo).Tables[0];
        }


        /// <summary>
        /// 获取所有人员数据（参与网上考勤不包含虚拟人员）
        /// <creator>wangl</creator>
        /// <date>2014-03-14</date>
        /// </summary>
        /// <param name="entityNo">公司编号</param>
        /// <returns>人员数据DataSet</returns>
        public DataTable GetAttendanceMainDeptEmplALL(string entityNo, string deptNo)
        {
            return dal.GetAttendanceMainDeptEmplALL(entityNo, deptNo).Tables[0];
        }
    }
}
